<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport"
		  content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>Document</title>
	<link rel="stylesheet" href="../../../static/css/font.css">
	<link rel="stylesheet" href="../../../static/css/xadmin.css">
	<script type="text/javascript" charset="utf-8" src="../../../demo/ueditor.config.js"></script>
	<script type="text/javascript" charset="utf-8" src="../../../demo/ueditor.all.min.js"> </script>
	<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
	<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
	<script type="text/javascript" charset="utf-8" src="../../../demo/lang/zh-cn/zh-cn.js"></script>
	<script src="../../../static/lib/layui/layui.js" charset="utf-8"></script>
	
	<style type="text/css">
		div{
			width:900px;
		}
	</style>
</head>
<body>
<form class="layui-form" action="">
	<div class="layui-form-item">
		<label class="layui-form-label">产品名</label>
		<div class="layui-input-block">
			<input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">密码框</label>
		<div class="layui-input-inline">
			<input type="password" name="password" required lay-verify="required" placeholder="请输入密码" class="layui-input">
		</div>
		<div class="layui-form-mid layui-word-aux">辅助文字</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">产品类型</label>
		<div class="layui-input-block">
			<select name="city" lay-verify="required">
				<option value=""></option>
				<option value="0">北京</option>
				<option value="1">上海</option>
				<option value="2">广州</option>
			</select>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">是否上架</label>
		<div class="layui-input-block">
			<input type="checkbox" name="switch" lay-skin="switch">
		</div>
	</div>
	<div class="layui-form-item layui-form-text">
		<label class="layui-form-label">文本域</label>
		<div class="layui-input-block">
			<textarea name="desc" placeholder="请输入内容" class="layui-textarea"></textarea>
		</div>
	</div>
	<div class="layui-form-item">
		<div class="layui-input-block">
			<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
			<button type="reset" class="layui-btn layui-btn-primary">重置</button>
		</div>
	</div>
</form>

<script>
	//Demo
	layui.use('form', function(){
		var form = layui.form;
		
		//监听提交
		form.on('submit(formDemo)', function(data){
			layer.msg(JSON.stringify(data.field));
			return false;
		});
	});
</script>
<div>
	<script id="editor" type="text/plain"></script>
</div>
<script type="text/javascript">
	var ue = UE.getEditor('editor');
</script>
</body>
</html>